(function(){
	
	//5.1.1评价商品
	var user_a = require("./3.用户注册与登录").user_a;
	var bus_a = require("./3.用户注册与登录").bus_a;

	var User = require("../user/_con");
	var user_b = new User({
		name:"老柯",
		email:"gaubeebangeel@gmail.com",
		password:"123456"
	});
	//查找商品
	var goods = bus_a.getGoodsByName("小包包");
	if (goods) {
		var EvaluationCon = require("../eval/_con");
		var evaluation_1_id = user_a.addEvaluation(goods._id,5,"很好");
		var evaluation_2_id = user_b.addEvaluation(goods._id,1,"很烂");
		var comment_1_id = user_b.addComment(EvaluationCon.get(evaluation_1_id).comment_id,"明明就很烂好么",true/*匿名*/);
		var comment_2_id = user_a.addComment(comment_1_id,"SB水狗");
		console.log("获取用户“",user_a.info.name,"”所有评价");
		console.log(JSON.stringify(user_a.getEvaluations()));
		console.log("获取商品所有评价",goods.getEvaluations());

		// console.log("获取所有评论",user_a.getComments())
	}

	module.exports = {
		bus_a:bus_a,
		user_a:user_a
	};
}());
